{include file="public/header" /}
</head>
<body>
<div class="x-body">
	<form action="{:URL(request()->controller().'/save',['id'=>$info.id])}" class="layui-form layui-form-pane" id="form">
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="x-red">*</span>title</label>
			<div class="layui-input-block">
				<input type="text" name="title" value="{$info.title}" placeholder="请输入title" lay-verify="required" class="layui-input"/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="x-red">*</span>radio</label>
			<div class="layui-input-block">
				<input type="radio" name="radio" value="0" title="选项0" {if $info.radio=="0" || $info.radio==""}checked{/if}/>
				<input type="radio" name="radio" value="1" title="选项1" {if $info.radio=="1"}checked{/if}/>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label"><span class="x-red">*</span>select</label>
			<div class="layui-input-inline">
				<select name="select">
					<option value="">请选择</option>
				</select>
			</div>
		</div>
		<div class="layui-form-item sunSelect" data-url="{:URL('/../index.php/ajax/common/area')}" data-value="id" data-name="AreaName">
			<label class="layui-form-label">所在地</label>
			<div class="layui-input-inline">
				<select name="province" data-id="{$info.province}" lay-filter="sunSelect" lay-verify="required"></select>
			</div>
			<div class="layui-input-inline">
				<select name="city" data-id="{$info.city}" lay-filter="sunSelect" lay-verify="required"></select>
			</div>
			<div class="layui-input-inline">
				<select name="county" data-id="{$info.county}" lay-filter="sunSelect" lay-verify="required"></select>
			</div>
		</div>

		<div class="layui-form-item uploadImageBox">
			<label class="layui-form-label">单张图片</label>
			<div class="layui-input-block">
				<div class="layui-upload">
					<button type="button" class="layui-btn uploadImage">上传图片</button>
					<img class="layui-upload-img showImage" src="{$info.img}"/>
					<input type="hidden" name="img" value="{$info.img}" class="inpImage"/>
				</div>
			</div>
		</div>

		<div class="layui-upload">
			<button type="button" class="layui-btn uploadImages" inpName="imgs">多图片上传</button>
			<blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
				预览图：
				<div class="layui-upload-list showImages">
					{volist name="images" id="v"}
					<div class="imgContainer uploadImageBoxes">
						<img src="{$v.img}">
						<a href="javascript:;" class="uploadDels">删除</a>
					</div>
					<input type="hidden" name="imgs[]" value="{$v.img}" class="uploadInps"/>
					{/volist}
				</div>
			</blockquote>
		</div>

		<div class="layui-form-item uploadFileBox">
			<label class="layui-form-label">上传文件</label>
			<div class="layui-input-block">
				<div class="layui-upload">
					<button type="button" class="layui-btn uploadFile">选择文件</button>
					<a class="showFile" href="{$info.file}" target="_blank">{$info.file_name}</a>
					<input type="hidden" name="file" value="{$info.file}" class="inpFile"/>
					<input type="hidden" name="file_name" value="{$info.file_name}" class="inpFileName"/>
				</div>
			</div>
		</div>

		<div class="layui-form-item uploadImageBox">
				<label class="layui-form-label">上传视频</label>
				<div class="layui-input-block">
					<div class="layui-upload">
						<button type="button" class="layui-btn layui-btn-normal" onclick="$('.videoFile').click()">选择文件</button>
						<button type="button" class="layui-btn videoUploadBtn">开始上传</button>
						<a href="http://{:config('qiniu.DOMAIN')}/{$info.video}" class="videoLink" target="_blank">{$info.video}</a>
						<input type="file" class="videoFile" accept="video/mp4" style="display: none;"/>
						<input type="hidden" name="video" value="{$info.video}" class="videoInp"/>
					</div>
				</div>
			</div>

		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">描述</label>
			<div class="layui-input-block">
				<textarea class="layui-textarea" name="content" placeholder="请输入内容">{$info.content}</textarea>
			</div>
		</div>
		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">内容</label>
			<div class="layui-input-block">
				<script id="content" name="content" class="editor" style="width:100%;height:240px;" type="text/plain">{$info.content}</script>
			</div>
		</div>

		<div class="layui-form-item" style="text-align: center;">
			<button class="layui-btn" lay-filter="save" lay-submit formObj="#form">保存</button>
		</div>
	</form>
</div>
</body>
</html>